package com.zret.oasys.entity;

public class Dept
{
	// 部门编号
	private int deptid;
	// 经理编号(这是int类型没错吧?)
	private int managerid;
	// 部门名称
	private String deptname;
	private Emp emp;
	// 构造方法
	public Dept()
	{
		//无参构造
	}
	
	//带参构造1
	public Dept(String deptname) 
	{
		this.setDeptname(deptname);
	}
	//带参构造2
	public Dept(int managerid, String deptname) 
	{
		this.setManagerid(managerid);
		this.setDeptname(deptname);
	}
	//带参构造3
	public Dept(int deptid, int managerid, String deptname) 
	{
		this.setDeptid(deptid);
		this.setManagerid(managerid);
		this.setDeptname(deptname);
	}
	
	//*************添加员工类************/
	
	/**
	 * @return the emp
	 */
	public Emp getEmp() {
		return emp;
	}

	/**
	 * @param emp the emp to set
	 */
	public void setEmp(Emp emp) {
		this.emp = emp;
	}
	//*************添加员工类************/
	
	
	//get set
	public int getDeptid() 
	{
		return deptid;
	}
	

	public void setDeptid(int deptid) 
	{
		this.deptid = deptid;
	}
	public int getManagerid()
	{
		return managerid;
	}
	public void setManagerid(int managerid)
	{
		this.managerid = managerid;
	}
	public String getDeptname()
	{
		return deptname;
	}
	public void setDeptname(String deptname)
	{
		this.deptname = deptname;
	}
	
	//toString
	@Override
	public String toString() {
		return " 部门编号：" + deptid 
				+ " 经理编号：" + managerid 
				+ " 部门名称：" + deptname ;
	}
}
